package com.xyoto.community.service;

import com.xyoto.community.dto.PageDTO;
import com.xyoto.community.dto.SendPicturePrivateLetterDTO;
import com.xyoto.community.dto.SendTextPrivateLetterDTO;
import com.xyoto.community.entity.main.UserPrivateLetter;
import com.xyoto.community.utils.Result;
import com.xyoto.community.vo.PrivateLetterVo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 私信service
 */
public interface PrivateLetterService {

    /**
     * 发送文本私信
     * @param sendTextPrivateLetterDTO
     * @return
     */
    Result sendText(SendTextPrivateLetterDTO sendTextPrivateLetterDTO);

    /**
     * 发送图片私信内容
     * @param multipartFile 图片
     * @param sendPicturePrivateLetterDTO
     * @return
     */
    Result sendPicture(MultipartFile multipartFile, SendPicturePrivateLetterDTO sendPicturePrivateLetterDTO);

    /**
     * 新增用户私信联系
     * @param userPrivateLetter
     */
    void saveUserContact(UserPrivateLetter userPrivateLetter);

    /**
     * 更新用户私信联系
     * @param userPrivateLetter
     */
    void updateUserContact(UserPrivateLetter userPrivateLetter);

    /**
     * 用户联系
     * @param userPrivateLetter
     */
    void userContact(UserPrivateLetter userPrivateLetter);

    /**
     * 获取用户私信内容
     * @param targetUserId
     * @param pageDTO
     * @return
     */
    Result getPrivateLetter(Integer targetUserId, PageDTO pageDTO);

    /**
     * 获取用户私信列表
     * @return
     */
    List<PrivateLetterVo> getPrivateLetterList();

    /**
     * 删除私信列表
     * @param privateLetterListId
     * @return
     */
    Result removePrivateLetterList(Integer privateLetterListId);
}
